package integer;

import org.junit.Test;

/**
 * @Package: integer
 * @ClassName: UseInteger
 * @Author: lujieni
 * @Description:
 * @Date: 2021-06-01 10:32
 * @Version: 1.0
 */
public class UseInteger {

    /**
     * @Description: 将二进制转为十进制
     * @param
     * @return:
     * @Author: lujieni
     * @Date: 2021/6/1
     */
    @Test
    public void test01(){
        int i = Integer.parseInt("101", 2);
        System.out.println(i); //5
    }

    @Test
    public void test02(){
        int a = 12; // 00001100
        int b = 4;  // 00000100
        System.out.println(12 & 4);
    }
}